package com.leyou.common.exception;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Data;
import lombok.Getter;

@Getter
public class LyException extends RuntimeException{

    private Integer status;

    public Integer getStatus() {
        return status;
    }

    public LyException(Integer status, String message){
        super(message);
        this.status = status;
    }
    public LyException(ExceptionEnum e){
        super(e.getMessage());
        this.status =e.getStatus();
    }
}
